package sctu.edu.java.year2016.team03.huzhou.day20160523.chapter6_1;

/**
 * Created by Administrator on 2016/5/23.
 */
public class work6_1 {
    public static void main(String[] args) {
        String s="mingrikejijavabu";
        int count=0;
        for(int i = 0;i<s.length();i++){
            if(s.charAt(i)=='i')
                count++;

        }
        System.out.println("这个字符串中i出现了"+count+"次");
    }

}

